package com.joe.learn.middle.service;

import com.joe.learn.api.MsgClientApi;
import com.joe.learn.api.MsgServerApi;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component("msgServerApi")
public class MsgServiceApiService implements MsgServerApi {

    @Resource
    private MsgClientApi msgClientApi;

    @Override
    public void sendMsg(String msg) {
        msg = "server receive msg:" + msg + ", and return msg";
        msgClientApi.receiveMsg(msg);
    }
}
